div {
    width: 100%;
    display: flex;
    margin: 0.25em 0;
}

div>input,
div>table,
div>select,
div>textarea {
    flex: 1;
}

div>textarea {
    min-height: 12ch;
    resize: vertical;
    overflow: auto;
}

legend::before {
    content: '▼';
}

.contract {
    height: 0;
    overflow: hidden;
    padding-bottom: 0;
}

.contract>legend::before {
    content: '▲';
}